//
//  HMBaseViewController.swift
//  swift微博项目
//
//  Created by huodian on 16/9/23.
//  Copyright © 2016年 huodian. All rights reserved.
//

import UIKit

class HMBaseViewController: UITableViewController,HMFirstViewDelegete  {

    
    
    
    var load = HMUserAccessViewModel.shareUserAccess.isOnLoad
    
    lazy var firstView : HMFirstView = HMFirstView()
    
    func loadview()
    {
        
        if load
        {
            
            self.loadview()
            
        }else
        {
            
            self.view = firstView
           
            firstView.delegate = self
            
        }
        
        
    }
    
   
    func clickRigestBtn()
    {
        
        print("注册按钮被点击了")
        
    }
    func clickLoadBtn()
    {
        
        print("登陆按钮被点击了")
        
        let oauth = HMOAuthViewController()
        
        let nav  = UINavigationController(rootViewController: oauth)
        
        present(nav, animated: true, completion: nil)
        
        
        
        
        
    }
    override func viewDidLoad() {
        super.viewDidLoad()

    
        loadview()
    
    
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
  
    
    
}
